package com.yiji.fintech.musfinance.base.enums;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum MerchantNatureEnum {

	STATOWNED("1", "国有企业"),

	THREE("2", "三资企业"),

	COLLECTIVE("3", "集体企业"),

	PRIVATE("4", "私营企业");

	/**
	 * 枚举值
	 */
	private final String code;

	/**
	 * 枚举描述
	 */
	private final String message;

	/**
	 * 构造一个<code>InstAccountTypeEnum</code>枚举对象
	 *
	 * @param code
	 * @param message
	 */
	private MerchantNatureEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}

	/**
	 * @return Returns the code.
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return Returns the message.
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @return Returns the code.
	 */
	public String code() {
		return code;
	}

	/**
	 * @return Returns the message.
	 */
	public String message() {
		return message;
	}

	public static Map<String, String> mapping() {
		Map<String, String> map = new LinkedHashMap<String, String>();
		for (MerchantNatureEnum type : values()) {
			map.put(type.getCode(), type.getMessage());
		}
		return map;
	}

	public static List<MerchantNatureEnum> getAll() {
		List<MerchantNatureEnum> list = new ArrayList<>();
		for (MerchantNatureEnum status : values()) {
			list.add(status);
		}
		return list;
	}

}
